import { post } from '@/core/utils/http';
import type { Response, BankCardType, BalanceDetailType, CashType } from '@/core/models';

/**  充值规则列表 */
export const queryTopUpTypeList = () : Promise<Response<any>> => {
	return post('Api/TopUp/TypeList', {}, true);
}

/**  获取默认的银行卡 */
export const queryDefaultBankCard = () : Promise<Response<BankCardType>> => {
	return post('Api/User/GetDefaultBankCard', {}, true);
}

/**  去体现 */
export const queryUserToCash = (data : any) : Promise<Response<any>> => {
	return post('Api/User/Cash', { data, }, true);
}

/**  获取我的银行卡列表 */
export const queryMyBankcardsList = () : Promise<Response<Array<BankCardType>>> => {
	return post('Api/User/GetMyBankcardsList', {}, true);
}

/**  获取银行卡组织信息 */
export const queryBankCardsOrganization = (data : any) : Promise<Response<Array<BankCardType>>> => {
	return post('Api/User/GetBankCardsOrganization', { data, }, true);
}

/**  添加银行卡 */
export const queryAddBankCards = (data : any) : Promise<Response<Array<BankCardType>>> => {
	return post('Api/User/AddBankCards', { data, }, true);
}

/**  设置默认银行卡 */
export const querySetDefaultBankCard = (data : any) : Promise<Response<any>> => {
	return post('Api/User/SetDefaultBankCard', { data, }, true);
}

/**  删除银行卡 */
export const queryRemovebankcard = (data : any) : Promise<Response<any>> => {
	return post('Api/User/Removebankcard', { data, }, true);
}

/**  获取用户余额明细 */
export const queryUserBalance = (data : any) : Promise<Response<Array<BalanceDetailType>>> => {
	return post('Api/User/UserBalance', { data, }, true);
}

/**  用户提现列表 */
export const queryCashList = (data : any) : Promise<Response<Array<CashType>>> => {
	return post('Api/User/CashList', { data, }, true);
}